home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Invisible Universe
/
Invisible Universe (1995)(Voyager)[Mac-PC].iso
/
mac
/
UNIVERSE
/
SHARED.DIR
/
01004_Script_co-only
< prev
next >
Wrap
Text File
|
1995-11-21
|
8KB
|
283 lines
on showHiliteNew
--put ">>> showHilite in co-only shared 1004"
global gNavIdleTicks, gNavPalette --, gLastCOSH
global gCurrChan,gFirsChan,gLastChan,gCOButtons,gPrevHilite,gCOM
global gHideAll, gMouseDownTime, gTSEnabled, gGlossPalette, gNavOffScreen, gGlossOffScreen
global gFiorellaOnStage, gUpdateNavPalette, gRollOverLock
if gHideAll then exit
if not(gCOM) then exit --showHilite
if the castNum of sprite 1 = 0 then exit
if gFiorellaOnStage then exit
if the commandDown or (the machineType = 256 and the controlDown) then exit
-- if voidP(gLastCOSH) then set gLastCOSH = gFirsChan
set m = the movie
set f = the frame
testOverheadMenu
if f <> the frame or m <> the movie then exit
if (not gNavOffScreen or gUpdateNavPalette) and not voidP(gNavPalette) then
if gNavIdleTicks + 3 < the ticks then
--put ">>> special idle prompt"
tell gNavPalette to idler
if not gGlossOffScreen and not voidP(gGlossPalette) then tell gGlossPalette to idler
end if
else
if not gGlossOffScreen and not voidP(gGlossPalette) then
if gNavIdleTicks + 3 < the ticks then
tell gGlossPalette to idler
set gNavIdleTicks = the ticks
end if
end if
end if
repeat with i = gLastChan down to gFirsChan
--dmd updateStage
-- dmd if rollOver(i) and isReal(i) then
if the commandDown or (the machineType = 256 and the controlDown) then exit repeat
if (the castNum of sprite i = 0) or ¼
(the visible of sprite i = 0) or ¼
(the puppet of sprite i = 1) or ¼
(the type of sprite i = 7) or ¼
(i = 8) then
next repeat
end if
if i > 11 and i < 22 and gTSEnabled then
set i = 12
next repeat
end if
if rollOver(i) then
if gRollOverLock then set gRollOverLock = 0
set theLine = line i of field 1026
--put ">>> chan=" & i && theLine
-- ??? DMD??? need this? if (the number of items in theLine) < 2 then next repeat
set dullSprite = the castNum of sprite i
rolloNew(theLine)
updateStage
--set the trace = 1
repeat while rollOver(i)
if the commandDown or (the machineType = 256 and the controlDown) then exit repeat
set state = 0
if the mouseDown then
--dmdabc if i = 22 or i = 23 then exit -- contents and retrace
if i = 22 or i = 23 then
set the castNum of sprite i = dullSprite
set the puppet of sprite i = 0
updateStage
doScriptNew(theLine)
exit
end if
repeat while the mouseDown
if state and not rollover(i) then
set the castNum of sprite i = dullSprite
--normNew(theLine)
updateStage
set state = 0
else
if not state and rollover(i) then
--if i = 22 then exit -- contents
if not gTSEnabled then set gMouseDownTime = the ticks
pressNew(theLine)
updateStage
set state = 1
end if
end if
end repeat
end if
if state then exit repeat
end repeat
if state = 1 then -- rollOver(i) and the mouseDown then
set the castNum of sprite i = dullSprite
set the puppet of sprite i = 0
updateStage
--normNew(theLine)
--if i = 22 then exit
--updateStage
if not gTSEnabled then set gMouseDownTime = the ticks
doScriptNew(theLine)
exit
end if
set the castNum of sprite i = dullSprite
set the puppet of sprite i = 0
--normNew(theLine)
updateStage
set i = gLastChan
end if
end repeat
end showHiliteNew
--dmd what does this do?
-- it almost works!!! doesn't restore the state of the sprite after unpuppeting
on isReal theButtonChannel
global gCurrChan
put the puppet of sprite gCurrChan into s
puppetSprite gCurrChan,false
put the castnum of sprite gCurrChan into it
set the puppet of sprite gCurrChan to s
return (it <> 0)
end isReal
on createGlossPalette
global gGlossPalette, gGlossOffScreen
set horizOrigin to the stageLeft + 230
set vertOrigin to the stageTop + 46
-- set myWindowRect to rect(horizOrigin,vertOrigin,horizOrigin+240, vertOrigin+388)
set myWindowRect to rect(horizOrigin,vertOrigin,horizOrigin+232, vertOrigin+388)
set myWindowRect to offset(myWindowRect, -5000,5000)
set gGlossPalette to window "GlossaryWindow"
set the rect of gGlossPalette to myWindowRect
moveToBack gGlossPalette
set the fileName of gGlossPalette to "_GLOSS.DIR"
set the titleVisible of gGlossPalette to false
set the windowType of gGlossPalette = 2
set gGlossOffScreen = 1
--set the rect of gGlossPalette to offset(the rect of gGlossPalette, -5000, 5000)
open gGlossPalette
moveToFront gGlossPalette
tell gGlossPalette to CalculateStageSize
--tell gGlossPalette to pause
end
on createNavPalette
global gNavPalette, gNavOffScreen
set horizOrigin to the stageLeft + 520
set vertOrigin to the stageTop + 39
set myWindowRect to rect(horizOrigin,vertOrigin,horizOrigin +100, vertOrigin+158)
set myWindowRect to offset(myWindowRect, -5000,5000)
set gNavPalette to window "NavWindow"
set the rect of gNavPalette to myWindowRect
moveToBack gNavPalette
set the fileName of gNavPalette to "_NAV.DIR"
set the titleVisible of gNavPalette to false
set the windowType of gNavPalette = 2
set gNavOffScreen = 1
--set the rect of gNavPalette to offset(the rect of gNavPalette, -5000, 5000)
open gNavPalette
moveToFront gNavPalette
tell gNavPalette to CalculateStageSize
close gNavPalette
--tell gNavPalette to pause
end
on createHelpPalette
global gHelpPalette, gHelpOffScreen
set horizOrigin to the stageLeft + 32
set vertOrigin to the stageTop + 24
set myWindowRect to rect(horizOrigin,vertOrigin,horizOrigin+576, vertOrigin+432)
set myWindowRect to offset(myWindowRect, -5000,5000)
set gHelpPalette to window "HelpWindow"
set the rect of gHelpPalette to myWindowRect
moveToBack gHelpPalette
set the fileName of gHelpPalette to "_HELP.DIR"
set the titleVisible of gHelpPalette to false
set the windowType of gHelpPalette = 2
set gHelpOffScreen = 1
--set the rect of gNavPalette to offset(the rect of gNavPalette, -5000, 5000)
open gHelpPalette
moveToFront gHelpPalette
tell gHelpPalette to CalculateStageSize
--tell gNavPalette to pause
end
on openNavPalette
global gNavPalette
if objectP(gNavPalette) then
--set the visible of gNavPalette to true
--moveToFront gNavPalette
tell gNavPalette to lOpenNavPalette
else
createNavPalette
end if
end
on openGlossPalette
global gGlossPalette
if objectP(gGlossPalette) then
--set the visible of gGlossPalette to true
--moveToFront gGlossPalette
tell gGlossPalette to lOpenGlossPalette
else
createGlossPalette
end if
end
on stopMovieXXX
global gNavPalette, gNavOffScreen
if objectP(gNavPalette) then
tell gNavPalette to lCloseNavPalette
--moveToBack gNavPalette
--set the visible of gNavPalette to false
end if
pass
end stopMovie
on sCloseNavPaletteXXX
global gNavPalette, gCOM
--if gCOM and objectP(gNavPalette) then moveToBack gNavPalette
if gCOM and objectP(gNavPalette) then close gNavPalette
end sCloseNavPalette